package com.guangfeng.yql.bean.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author yql
 * @since 2022-09-21
 */
@Data
@Accessors(chain = true)
@TableName("sys_role")
@ApiModel(value = "RoleDto对象", description = "角色表")
public class RoleDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    @Range(min = 0,max = 100000000,message = "主键 不合法")
    @NotNull(message = "主键 不能为空")
    private Long id;

    @ApiModelProperty("角色名称")
    @TableField("name")
    @Length(max = 50,message = "角色名称 不能成功50字")
    @NotEmpty(message = "角色名称 不能为空")
    private String name;

    @ApiModelProperty("状态 1 正常 0 无效")
    @TableField("status")
    @Range(min = 0,max = 100000000,message = "状态 1 正常 0 无效 不合法")
    @NotNull(message = "状态 1 正常 0 无效 不能为空")
    private Integer status;


}
